<template>
  <div>
    <div class="card" v-for="(item, index) in cards" :key="index">
      <div class="date">{{type}}日期：{{item.date}}</div>
      <div class="goods">
        <img :src="item.img" alt="">
        <div class="goods-desc">
          <div>{{item.name}}</div>
          <div class="point" v-if="item.point">{{item.point}}积分</div>
          <div class="point" v-if="item.status==0" @click="getLickGoods(item)">立即领取</div>
          <div class="point1" v-if="item.status==1">已领取</div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data () {
    return {
    }
  },
  props: ['type', 'cards'],

  methods: {
    getLickGoods (item) {
      this.$emit('getLickGoods', item)
    }
  }
}
</script>
<style scoped>
.card {
  margin: 30rpx;
  border-radius: 20rpx;
  padding: 20rpx 30rpx;
  font-size: 30rpx;
  background: #ffffff;
}

.card .date {
  padding-bottom: 20rpx;
  border-bottom: 1rpx solid #ccc;
}
.card .goods {
  padding-top: 30rpx;
  text-align: right;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.card .goods img {
  height: 146rpx;
  width: 146rpx;
}

.card .goods .point {
  font-size: 38rpx;
  color: #ff626b;
}

.card .goods .point1 {
  font-size: 38rpx;
  color: rgb(134, 134, 134);
}
</style>
